package com.jintian.hnsj_metting

import android.app.Application
import com.hikvision.smarteyes.utils.ThreadPoolUtil
import com.jintian.hnsj_metting.api.ApiConfig
import com.jintian.hnsj_metting.util.CrashUtil
import com.jintian.hnsj_metting.util.LogMonitor
import com.tencent.bugly.crashreport.CrashReport

class App : Application() {

    companion object {
        var instance: Application? = null
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        ApiConfig.init(this)


        CrashReport.initCrashReport(this, "c64f4d759c", true)
        /**
         * 设置crash记录
         * 记录即时crash信息
         *
         */
//        Thread.setDefaultUncaughtExceptionHandler(CrashUtil())
//        ThreadPoolUtil.getInstance().exe(Runnable {
//            LogMonitor.getInstance().setMethodStatckLength(30)
//            LogMonitor.getInstance().setTimeBlock(2000)
//            LogMonitor.getInstance().start()
//        })
    }
}